package com.ruoyi.web.controller.datastatistics;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.datastatistics.service.IMainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/datastatistics/mainIndex")
public class MainController extends BaseController {

    @Autowired
    private IMainService mainService;

    //大表首页统计-头部数据统计
    @GetMapping("/getMainHeadDataDb")
    public AjaxResult getMainHeadDataDb()
    {
        return success(mainService.getMainHeadDataDb());
    }

    //大表首页统计-图表数据统计
    @GetMapping("/getMainChartsDataDb")
    public AjaxResult getMainChartsDataDb(@RequestParam(value = "startTime")String startTime,
                                          @RequestParam(value = "endTime")String endTime,
                                          @RequestParam(value = "feezeTime")String feezeTime,
                                          @RequestParam(value = "getTimeN")String getTimeN)
    {
        return success(mainService.getMainChartsDataDb(startTime,endTime,feezeTime,getTimeN));
    }



}
